package my_class.reflect;

import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.Properties;

public class Test3 {
    public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchFieldException {
        Properties prop = new Properties();
        prop.load(new FileReader("AdvancedCode/src/my_class/reflect/stu-info.properties"));

        Class<?> clazz = Class.forName(prop.getProperty("className"));
        Field name = clazz.getDeclaredField("name");
        System.out.println(name);
        Field num = clazz.getDeclaredField("num");
        System.out.println(num);
    }
}
